home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / Chassis 6.0 ƒ / myClikLoop.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-22  |  1009 b   |  33 lines  |  [TEXT/KAHL]

  1. /************************************************************************************/
  2. /*    myClikLoop                                                                        */
  3. /*                                                                                    */
  4. /*    Note:    executed repeatedly when the mouse is held down, and dragged outside of    */
  5. /*            the viewRect                                                            */
  6. /************************************************************************************/
  7.  
  8. #include "MyHeaders.h"
  9.  
  10. pascal Boolean myClikLoop()
  11. {
  12.     short            myClikRetCode;
  13.     Point        myMouseLoc;
  14.     short            vScrollAmt;
  15.  
  16.     myClikRetCode = TRUE;
  17.  
  18.     GetMouse (&myMouseLoc);
  19.     
  20.     GetClip(workRegionH);                                            /* sve clip rgn    */
  21.     ClipRect(&(*windTbl[windSub].windPtr).portRect);                /* reset it        */
  22.  
  23.     if (myMouseLoc.v > (**windTbl[windSub].windTEH[0]).viewRect.bottom)    /* down    */
  24.         myActionProc (windTbl[windSub].windCntlH[0], inDownButton);
  25.     else
  26.     if (myMouseLoc.v < (**windTbl[windSub].windTEH[0]).viewRect.top)    /* up    */
  27.         myActionProc (windTbl[windSub].windCntlH[0], inUpButton);
  28.  
  29.     SetClip(workRegionH);                                            /* restore clip    */
  30.  
  31.     return myClikRetCode;
  32. }
  33.